package com.aj.http.response;

import org.json.JSONObject;

import com.aj.databases.entry.Account;

public class LoginRespons extends BaseRespond {

	private Account account;

	public LoginRespons(JSONObject json) {
		super(json);
		try {
			if (common != null && common.getResult() != null) {
				JSONObject jsonObject = common.getResult();
				account = new Account();
				if (!jsonObject.isNull("tokenId")) {
					account.setToken(jsonObject.getString("tokenId"));
				}
				if (!jsonObject.isNull("userId")) {
					account.setLast_used_user_id(jsonObject.getString("userId"));
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public Account getAccount() {
		return account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

}
